package com.jang.controller.cases;

import com.jang.Entity.cases.CaseRuningEntity;
import com.jang.Entity.cases.ConfigEntity;
import com.jang.service.cases.CaseRuningService;
import com.jang.service.cases.ConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/caseApi")
public class CaseRestController {
    @Autowired
    CaseRuningService caseRuningService;
    @RequestMapping(value= "/CaseList", method = RequestMethod.POST)
    public Object CaseList(@RequestBody CaseRuningEntity caseRuningEntity){
        Object result = caseRuningService.CaseList(caseRuningEntity);
        return result;
    }
    @RequestMapping(value= "/AddCase", method = RequestMethod.POST)
    public Object AddCase(@RequestBody CaseRuningEntity caseRuningEntity){
        Object result = caseRuningService.CaseList(caseRuningEntity);
        return result;
    }
    @RequestMapping(value= "/RunCase", method = RequestMethod.POST)
    public Object RunCase(@RequestParam int case_id,@RequestParam int env_id){
        Object result = caseRuningService.CaseRuning_Post(case_id,env_id);
        return result;
    }
}
